import request from '@/utils/request';

export function getWebsocketConfig() {
	return request({
		url: '/webSocketUrl/getWebSorkctIpAndPort',
		method: 'post',
	});
}

/** 上传图片地址 */
export const uploadUrl = `${import.meta.env.VITE_BASE_API}/fileManager/fileUpload`;

/** 显示图片 */
export function downloadUrl(fileId: string) {
	if (fileId) {
		return `${
			import.meta.env.VITE_BASE_API
		}/fileManager/downloadFile?fileId=${fileId}&time=${Number(new Date())}`;
	}
	return '';
}
